using System;
using System.Windows.Forms;

namespace WorkerService1
{
    static class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            string portName = "COM1"; // 默认串口
            if (args.Length > 0)
                portName = args[0];  // 从命令行参数获取串口

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm(portName));
        }
    }
}